import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import javax.swing.JComponent;

class MyGlassPane extends JComponent
{
  private static final long serialVersionUID = 1L;
  private Font font = new Font("monospaced", Font.PLAIN, 64);
  private Control control;

  MyGlassPane()
  {
    System.out.println("MyGlassPane, MyGlassPane()");
  }
  
  public void setControl(Control control)
  {
	System.out.println("MyGlassPane, setControl(Control control)");
    this.control = control;
  }

  public Control getControl()
  {
	System.out.println("MyGlassPane, getControl()");
    return this.control;
  }

  @Override
  protected void paintComponent(Graphics g)
  {
      //System.out.println("MyGlassPane, paintComponent()");
	  g.setFont(font);
	  g.setColor(Color.cyan);
	  g.drawString("-"+control.getCurrentId()+"-", 580, 100);
  }
  
  public void finalize() throws Throwable
  {
	System.out.println("MyGlassPane, finalize()");
  }
  
  public String toString()
  {
	System.out.println("MyGlassPane, toString()");
	return super.toString();
  }
}